import React from 'react'
import { NavBar } from 'antd-mobile'
import { useLocation, useNavigate } from 'react-router-dom'
function Index() {
  const { state } = useLocation()
  console.log(state);
  let navget=useNavigate()
  return (
    <div>
      <NavBar onBack={()=>navget('/')}>标题</NavBar>
      <div>
        <img src={state.image} alt="" />
        <div style={{ display: 'flex' }}>
          <span>{state.title}</span>
          <span>日期：{state.date}</span>
        </div>

      </div>
    </div>
  )
}

export default Index
